1. Field of the Invention
The present invention relates to a three-dimensional shape measuring apparatus which obtains range information to an object by using a pattern projection (structured light projection) method, and more particularly, to a three-dimensional shape measuring apparatus which simultaneously obtains range information and luminance information with high precision independently of object.
2. Description of the Prior Art
As methods for measuring the shape of an object, conventionally a passive method (a stereoscopic vision method etc.) and an active method (structured light projection spot light projection etc. using laser radar) have been known. The passive method has general versatility and can ease constraints on an object. The active method attains a high level of measurement precision although the range of measurement is often small due to limitation of light projection unit or the like.
In one of active methods, a pattern projection method, pattern light as a reference is projected onto an object, and image pickup is performed from a direction different from a direction of the pattern light projection. The obtained pattern is deformed by the shape of the object. Three-dimensional measurement of the object can be made by correlating the deformed pattern obtained by image pickup with the projected pattern.
In the pattern projection method, the problem is how to perform the correlating between the deformed pattern and the projected pattern with a small amount of erroneous correlation and in a simple manner. Conventionally, various pattern projection methods have been proposed.
For example, Japanese Published Unexamined Patent Application No. Hei 5-332737 and Japanese Patent No. 2565885 disclose the conventional pattern projection methods.
Japanese Published Unexamined Patent Application No. Hei 5-332737 discloses a shape measuring apparatus using a spatial coding method as a pattern projection method. This apparatus has a laser beam source, a lens system to shape laser beam into slit light, a scanning device to emit the shaped laser beam onto an object and scans the light on the object, a CCD camera to detect reflection light from the object, and a device to control these elements. In this construction, when the object is scanned with the laser beam by the scanning device, portions irradiated with the laser beam and unirradiated portions form a stripe pattern. The object surface is divided into N recognizable portions by plural different patterns of laser beam emission. The shape of the object is calculated by determining a portion including each pixel in images of the object obtained by image pickup by the CCD camera from different positions.
Japanese Patent No. 2565885 discloses a shape measuring apparatus using a spatial coding method as a pattern projection method. This apparatus has a ternary grating plate pattern original image where at least three types of gradation areas are adjacent to each other at an intersection of boundaries of the gradation areas, a projector to project ternary grating plate pattern light via the pattern original image onto an object, a CCD camera to image-pickup the object on which the ternary grating plate pattern light is projected, and a measuring unit to correlate the pattern original image with the pattern image obtained by image pickup by the CCD camera, thus performing measurement. In this construction, when the projector projects the ternary grating plate pattern light onto the object, and the CCD camera performs image pickup on the object where the grid-plate pattern light is projected, a pattern image is obtained. The measuring unit assigns a main code to each intersection of gradation areas of the pattern image, in correspondence with the types and orders of peripheral gradations, and assigns an adjacent main code as a feature code for recognition of the intersection. This uniquely correlates the pattern obtained by image pickup and the pattern original image, accordingly, high density measurement can be performed by one projection.
However, according to the conventional shape measuring apparatus disclosed in Japanese Published Unexamined Patent Application No. Hei 5-332737, in order to increase the resolution, several times of scanning with the laser beam and several times of image pickup by the camera are required. For example, to divide an image into 256 areas, eight times of image pickup are necessary. For this reason, image pickup cannot be performed on a quickly moving object without difficulty.
According to the conventional shape measuring apparatus disclosed in Japanese Patent No. 2565885, since the focal depth of optical system of the projector is small, the edge between tonality areas become blurred in correspondence with the distance to the object surface and measurement cannot be made with high precision. Thus the measurement-possible range in a depthwise direction is limited.
Further, in the respective conventional shape measuring apparatuses, as a projected pattern changes in accordance with the shape, the reflectivity and the like of the object, correlating between the pattern and the projected pattern is difficult.
The present invention has been made in view of the above circumstances, and provides a three-dimensional shape measuring apparatus capable of obtaining range information with high precision independently of an object.
Further, the present invention provides a three-dimensional shape measuring apparatus capable of simultaneously obtaining luminance information and range information.
According to one aspect of the present invention, provided is a three-dimensional shape measuring apparatus including: a light source that emits laser beam; a projection part that generates pattern light having plural areas, intensity-modulated to ternary or higher representation values based on a pattern code, using the laser beam, and projects the pattern light onto an object; an image pickup part that performs image pickup on the light, reflected from the object by projection of the pattern light, so as to obtain a pattern image; and an arithmetic part that calculates range information to the object based on the pattern code and the pattern image.
In accordance with the above construction, the laser beam used as a light source has a linearity which is not greatly influenced by a focal depth or the like, the edge between areas is not blurred and the measurement possible range in the depthwise direction can be widened. Further, by projecting the intensity-modulated pattern light onto an object, the shape can be measured by one image pickup.
According to another aspect of the present invention, provided is a three-dimensional shape measuring apparatus including: a light source that emits laser beam; a projection part that generates pattern light having plural areas, intensity-modulated to ternary or higher representation values based on a pattern code, using the laser beam, and projects the pattern light onto an object; an image pickup part that performs image pickup on the light, reflected from the object by projection of the pattern light, so as to obtain a pattern image; an arithmetic part that calculates range information to the object based on the pattern code and the pattern image; and a three-dimensional image formation part that forms a three-dimensional image based on the range information obtained by calculation by the arithmetic part and luminance information obtained by the image pickup part.
In accordance with the above construction, as the laser beam is used as a light source, the edge between areas is not blurred and the measurement-possible range in the depthwise direction can be widened. Further, by projecting the intensity-modulated pattern light onto an object, the shape can be measured by one image pickup. The three-dimensional image formation part forms a three-dimensional image based on the range information and the luminance information.